﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition.Primitives;
using System.ComponentModel.Composition.Hosting;

namespace FluentMef
{
    public static class ContainerFactory
    {
        public static CompositionContainer CreateContainer(Action<IContainerBuilder> initialize)
        {
            var builder = new ContainerBuilder();

            initialize(builder);

            return builder.CreateContainer();
        }
    }
}
